package com.dragon.modules.yuegou.query.wallet;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.wallet.EarlyMemberCardEntity;
import com.dragon.modules.yuegou.enums.CurrencyType;
import com.dragon.modules.yuegou.enums.wallet.EarlyMemberCardStatus;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 会员预使用悦卡 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-01-16 14:39:27
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class EarlyMemberCardQuery extends EarlyMemberCardEntity implements Query<EarlyMemberCardEntity> {

    /** 会员预使用id查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员卡ID（冗余ID）查询条件 */
	@JsonUnwrapped(prefix = "memberCardId")
	private Condition<String> memberCardIdCondition;

    /** 会员ID（冗余ID）查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 会员钱包ID查询条件 */
	@JsonUnwrapped(prefix = "memberWalletId")
	private Condition<String> memberWalletIdCondition;

    /** 悦卡类型ID查询条件 */
	@JsonUnwrapped(prefix = "cardTemplateId")
	private Condition<String> cardTemplateIdCondition;

    /** 悦卡卡号查询条件 */
	@JsonUnwrapped(prefix = "cardNo")
	private Condition<String> cardNoCondition;

    /** 订单号查询条件 */
	@JsonUnwrapped(prefix = "orderNo")
	private Condition<String> orderNoCondition;

    /** 悦卡支付前余额查询条件 */
	@JsonUnwrapped(prefix = "amountBefore")
	private Condition<BigDecimal> amountBeforeCondition;

    /** 支付金额查询条件 */
	@JsonUnwrapped(prefix = "amount")
	private Condition<BigDecimal> amountCondition;

    /** 悦卡支付后余额查询条件 */
	@JsonUnwrapped(prefix = "amountAfter")
	private Condition<BigDecimal> amountAfterCondition;

    /** 版本查询条件 */
	@JsonUnwrapped(prefix = "version")
	private Condition<Integer> versionCondition;

    /** [枚举]使用状态：0-未使用-UNUSED、1-已使用-USD、2-已回退-RETURNED查询条件 */
	@JsonUnwrapped(prefix = "status")
	private Condition<EarlyMemberCardStatus> statusCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

    /** [全局枚举]币种：1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT查询条件 */
	@JsonUnwrapped(prefix = "currencyType")
	private Condition<CurrencyType> currencyTypeCondition;

    /** 企业id查询条件 */
	@JsonUnwrapped(prefix = "companyId")
	private Condition<String> companyIdCondition;

    /** 企业名称查询条件 */
	@JsonUnwrapped(prefix = "companyName")
	private Condition<String> companyNameCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public EarlyMemberCardQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public EarlyMemberCardQuery(EarlyMemberCardEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public EarlyMemberCardQuery(EarlyMemberCardQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberCardIdCondition != null) {
			this.memberCardIdCondition = other.memberCardIdCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.memberWalletIdCondition != null) {
			this.memberWalletIdCondition = other.memberWalletIdCondition.copy();
		}
		if(other.cardTemplateIdCondition != null) {
			this.cardTemplateIdCondition = other.cardTemplateIdCondition.copy();
		}
		if(other.cardNoCondition != null) {
			this.cardNoCondition = other.cardNoCondition.copy();
		}
		if(other.orderNoCondition != null) {
			this.orderNoCondition = other.orderNoCondition.copy();
		}
		if(other.amountBeforeCondition != null) {
			this.amountBeforeCondition = other.amountBeforeCondition.copy();
		}
		if(other.amountCondition != null) {
			this.amountCondition = other.amountCondition.copy();
		}
		if(other.amountAfterCondition != null) {
			this.amountAfterCondition = other.amountAfterCondition.copy();
		}
		if(other.versionCondition != null) {
			this.versionCondition = other.versionCondition.copy();
		}
		if(other.statusCondition != null) {
			this.statusCondition = other.statusCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
		this.setOther(other);
	}
	private void setOther(EarlyMemberCardQuery other){
		if(other.currencyTypeCondition != null) {
			this.currencyTypeCondition = other.currencyTypeCondition.copy();
		}
		if(other.companyIdCondition != null) {
			this.companyIdCondition = other.companyIdCondition.copy();
		}
		if(other.companyNameCondition != null) {
			this.companyNameCondition = other.companyNameCondition.copy();
		}
	}

	@Override
	public QueryWrapper<EarlyMemberCardEntity> toQueryWrapper() {
		QueryWrapper<EarlyMemberCardEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberCardIdCondition != null) {
			memberCardIdCondition.toWrapper(wrapper, COL_MEMBER_CARD_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (memberWalletIdCondition != null) {
			memberWalletIdCondition.toWrapper(wrapper, COL_MEMBER_WALLET_ID);
		}
		if (cardTemplateIdCondition != null) {
			cardTemplateIdCondition.toWrapper(wrapper, COL_CARD_TEMPLATE_ID);
		}
		if (cardNoCondition != null) {
			cardNoCondition.toWrapper(wrapper, COL_CARD_NO);
		}
		if (orderNoCondition != null) {
			orderNoCondition.toWrapper(wrapper, COL_ORDER_NO);
		}
		if (amountBeforeCondition != null) {
			amountBeforeCondition.toWrapper(wrapper, COL_AMOUNT_BEFORE);
		}
		if (amountCondition != null) {
			amountCondition.toWrapper(wrapper, COL_AMOUNT);
		}
		if (amountAfterCondition != null) {
			amountAfterCondition.toWrapper(wrapper, COL_AMOUNT_AFTER);
		}
		if (versionCondition != null) {
			versionCondition.toWrapper(wrapper, COL_VERSION);
		}
		if (statusCondition != null) {
			statusCondition.toWrapper(wrapper, COL_STATUS);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		return getQueryWrapper(wrapper);
	}
	private QueryWrapper<EarlyMemberCardEntity> getQueryWrapper(QueryWrapper<EarlyMemberCardEntity> wrapper){
		if (currencyTypeCondition != null) {
			currencyTypeCondition.toWrapper(wrapper, COL_CURRENCY_TYPE);
		}
		if (companyIdCondition != null) {
			companyIdCondition.toWrapper(wrapper, COL_COMPANY_ID);
		}
		if (companyNameCondition != null) {
			companyNameCondition.toWrapper(wrapper, COL_COMPANY_NAME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回会员预使用id查询条件
	 * 
	 * @return idCondition 会员预使用id查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取会员预使用id查询条件
	 * 
	 * @return idCondition 会员预使用id查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置会员预使用id查询条件
	 * 
	 * @param idCondition 会员预使用id查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员卡ID（冗余ID）查询条件
	 * 
	 * @return memberCardIdCondition 会员卡ID（冗余ID）查询条件
	 */
	public Condition<String> memberCardId() {
		this.memberCardIdCondition = new Condition<>();
		return this.memberCardIdCondition;
	}
	
	/**
	 * 获取会员卡ID（冗余ID）查询条件
	 * 
	 * @return memberCardIdCondition 会员卡ID（冗余ID）查询条件
	 */
	public Condition<String> getMemberCardIdCondition() {
		return memberCardIdCondition;
	}

	/**
	 * 设置会员卡ID（冗余ID）查询条件
	 * 
	 * @param memberCardIdCondition 会员卡ID（冗余ID）查询条件
	 */
	public void setMemberCardIdCondition(Condition<String> memberCardIdCondition) {
		this.memberCardIdCondition = memberCardIdCondition;
	}

	/**
	 * 构造并返回会员ID（冗余ID）查询条件
	 * 
	 * @return memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID（冗余ID）查询条件
	 * 
	 * @return memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID（冗余ID）查询条件
	 * 
	 * @param memberIdCondition 会员ID（冗余ID）查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回会员钱包ID查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包ID查询条件
	 */
	public Condition<String> memberWalletId() {
		this.memberWalletIdCondition = new Condition<>();
		return this.memberWalletIdCondition;
	}
	
	/**
	 * 获取会员钱包ID查询条件
	 * 
	 * @return memberWalletIdCondition 会员钱包ID查询条件
	 */
	public Condition<String> getMemberWalletIdCondition() {
		return memberWalletIdCondition;
	}

	/**
	 * 设置会员钱包ID查询条件
	 * 
	 * @param memberWalletIdCondition 会员钱包ID查询条件
	 */
	public void setMemberWalletIdCondition(Condition<String> memberWalletIdCondition) {
		this.memberWalletIdCondition = memberWalletIdCondition;
	}

	/**
	 * 构造并返回悦卡类型ID查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡类型ID查询条件
	 */
	public Condition<String> cardTemplateId() {
		this.cardTemplateIdCondition = new Condition<>();
		return this.cardTemplateIdCondition;
	}
	
	/**
	 * 获取悦卡类型ID查询条件
	 * 
	 * @return cardTemplateIdCondition 悦卡类型ID查询条件
	 */
	public Condition<String> getCardTemplateIdCondition() {
		return cardTemplateIdCondition;
	}

	/**
	 * 设置悦卡类型ID查询条件
	 * 
	 * @param cardTemplateIdCondition 悦卡类型ID查询条件
	 */
	public void setCardTemplateIdCondition(Condition<String> cardTemplateIdCondition) {
		this.cardTemplateIdCondition = cardTemplateIdCondition;
	}

	/**
	 * 构造并返回悦卡卡号查询条件
	 * 
	 * @return cardNoCondition 悦卡卡号查询条件
	 */
	public Condition<String> cardNo() {
		this.cardNoCondition = new Condition<>();
		return this.cardNoCondition;
	}
	
	/**
	 * 获取悦卡卡号查询条件
	 * 
	 * @return cardNoCondition 悦卡卡号查询条件
	 */
	public Condition<String> getCardNoCondition() {
		return cardNoCondition;
	}

	/**
	 * 设置悦卡卡号查询条件
	 * 
	 * @param cardNoCondition 悦卡卡号查询条件
	 */
	public void setCardNoCondition(Condition<String> cardNoCondition) {
		this.cardNoCondition = cardNoCondition;
	}

	/**
	 * 构造并返回订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> orderNo() {
		this.orderNoCondition = new Condition<>();
		return this.orderNoCondition;
	}
	
	/**
	 * 获取订单号查询条件
	 * 
	 * @return orderNoCondition 订单号查询条件
	 */
	public Condition<String> getOrderNoCondition() {
		return orderNoCondition;
	}

	/**
	 * 设置订单号查询条件
	 * 
	 * @param orderNoCondition 订单号查询条件
	 */
	public void setOrderNoCondition(Condition<String> orderNoCondition) {
		this.orderNoCondition = orderNoCondition;
	}

	/**
	 * 构造并返回悦卡支付前余额查询条件
	 * 
	 * @return amountBeforeCondition 悦卡支付前余额查询条件
	 */
	public Condition<BigDecimal> amountBefore() {
		this.amountBeforeCondition = new Condition<>();
		return this.amountBeforeCondition;
	}
	
	/**
	 * 获取悦卡支付前余额查询条件
	 * 
	 * @return amountBeforeCondition 悦卡支付前余额查询条件
	 */
	public Condition<BigDecimal> getAmountBeforeCondition() {
		return amountBeforeCondition;
	}

	/**
	 * 设置悦卡支付前余额查询条件
	 * 
	 * @param amountBeforeCondition 悦卡支付前余额查询条件
	 */
	public void setAmountBeforeCondition(Condition<BigDecimal> amountBeforeCondition) {
		this.amountBeforeCondition = amountBeforeCondition;
	}

	/**
	 * 构造并返回支付金额查询条件
	 * 
	 * @return amountCondition 支付金额查询条件
	 */
	public Condition<BigDecimal> amount() {
		this.amountCondition = new Condition<>();
		return this.amountCondition;
	}
	
	/**
	 * 获取支付金额查询条件
	 * 
	 * @return amountCondition 支付金额查询条件
	 */
	public Condition<BigDecimal> getAmountCondition() {
		return amountCondition;
	}

	/**
	 * 设置支付金额查询条件
	 * 
	 * @param amountCondition 支付金额查询条件
	 */
	public void setAmountCondition(Condition<BigDecimal> amountCondition) {
		this.amountCondition = amountCondition;
	}

	/**
	 * 构造并返回悦卡支付后余额查询条件
	 * 
	 * @return amountAfterCondition 悦卡支付后余额查询条件
	 */
	public Condition<BigDecimal> amountAfter() {
		this.amountAfterCondition = new Condition<>();
		return this.amountAfterCondition;
	}
	
	/**
	 * 获取悦卡支付后余额查询条件
	 * 
	 * @return amountAfterCondition 悦卡支付后余额查询条件
	 */
	public Condition<BigDecimal> getAmountAfterCondition() {
		return amountAfterCondition;
	}

	/**
	 * 设置悦卡支付后余额查询条件
	 * 
	 * @param amountAfterCondition 悦卡支付后余额查询条件
	 */
	public void setAmountAfterCondition(Condition<BigDecimal> amountAfterCondition) {
		this.amountAfterCondition = amountAfterCondition;
	}

	/**
	 * 构造并返回版本查询条件
	 * 
	 * @return versionCondition 版本查询条件
	 */
	public Condition<Integer> version() {
		this.versionCondition = new Condition<>();
		return this.versionCondition;
	}
	
	/**
	 * 获取版本查询条件
	 * 
	 * @return versionCondition 版本查询条件
	 */
	public Condition<Integer> getVersionCondition() {
		return versionCondition;
	}

	/**
	 * 设置版本查询条件
	 * 
	 * @param versionCondition 版本查询条件
	 */
	public void setVersionCondition(Condition<Integer> versionCondition) {
		this.versionCondition = versionCondition;
	}

	/**
	 * 构造并返回[枚举]使用状态：0-未使用-UNUSED、1-已使用-USD、2-已回退-RETURNED查询条件
	 * 
	 * @return statusCondition [枚举]使用状态：0-未使用-UNUSED、1-已使用-USD、2-已回退-RETURNED查询条件
	 */
	public Condition<EarlyMemberCardStatus> status() {
		this.statusCondition = new Condition<>();
		return this.statusCondition;
	}
	
	/**
	 * 获取[枚举]使用状态：0-未使用-UNUSED、1-已使用-USD、2-已回退-RETURNED查询条件
	 * 
	 * @return statusCondition [枚举]使用状态：0-未使用-UNUSED、1-已使用-USD、2-已回退-RETURNED查询条件
	 */
	public Condition<EarlyMemberCardStatus> getStatusCondition() {
		return statusCondition;
	}

	/**
	 * 设置[枚举]使用状态：0-未使用-UNUSED、1-已使用-USD、2-已回退-RETURNED查询条件
	 * 
	 * @param statusCondition [枚举]使用状态：0-未使用-UNUSED、1-已使用-USD、2-已回退-RETURNED查询条件
	 */
	public void setStatusCondition(Condition<EarlyMemberCardStatus> statusCondition) {
		this.statusCondition = statusCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return modifiedTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param modifiedTimeCondition 查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

	/**
	 * 构造并返回[全局枚举]币种：1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT查询条件
	 * 
	 * @return currencyTypeCondition [全局枚举]币种：1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT查询条件
	 */
	public Condition<CurrencyType> currencyType() {
		this.currencyTypeCondition = new Condition<>();
		return this.currencyTypeCondition;
	}
	
	/**
	 * 获取[全局枚举]币种：1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT查询条件
	 * 
	 * @return currencyTypeCondition [全局枚举]币种：1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT查询条件
	 */
	public Condition<CurrencyType> getCurrencyTypeCondition() {
		return currencyTypeCondition;
	}

	/**
	 * 设置[全局枚举]币种：1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT查询条件
	 * 
	 * @param currencyTypeCondition [全局枚举]币种：1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT查询条件
	 */
	public void setCurrencyTypeCondition(Condition<CurrencyType> currencyTypeCondition) {
		this.currencyTypeCondition = currencyTypeCondition;
	}

	/**
	 * 构造并返回企业id查询条件
	 * 
	 * @return companyIdCondition 企业id查询条件
	 */
	public Condition<String> companyId() {
		this.companyIdCondition = new Condition<>();
		return this.companyIdCondition;
	}
	
	/**
	 * 获取企业id查询条件
	 * 
	 * @return companyIdCondition 企业id查询条件
	 */
	public Condition<String> getCompanyIdCondition() {
		return companyIdCondition;
	}

	/**
	 * 设置企业id查询条件
	 * 
	 * @param companyIdCondition 企业id查询条件
	 */
	public void setCompanyIdCondition(Condition<String> companyIdCondition) {
		this.companyIdCondition = companyIdCondition;
	}

	/**
	 * 构造并返回企业名称查询条件
	 * 
	 * @return companyNameCondition 企业名称查询条件
	 */
	public Condition<String> companyName() {
		this.companyNameCondition = new Condition<>();
		return this.companyNameCondition;
	}
	
	/**
	 * 获取企业名称查询条件
	 * 
	 * @return companyNameCondition 企业名称查询条件
	 */
	public Condition<String> getCompanyNameCondition() {
		return companyNameCondition;
	}

	/**
	 * 设置企业名称查询条件
	 * 
	 * @param companyNameCondition 企业名称查询条件
	 */
	public void setCompanyNameCondition(Condition<String> companyNameCondition) {
		this.companyNameCondition = companyNameCondition;
	}

}
